package com.ruoyi.system.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.system.domain.SysAttachment;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * 附件管理Service接口
 *
 * @author shuyan
 * @date 2021-01-13
 */
public interface ISysAttachmentService extends IService<SysAttachment> {

    /**
     * 查询列表
     */
    List<SysAttachment> queryList(SysAttachment sysAttachment);

    /**
     * 保存附件
     * @param sysAttachment 基本信息
     * @param file 上传的文件
     * @return
     */
    boolean saveAttachment(SysAttachment sysAttachment, MultipartFile file);

    boolean removeAttachment(List<Long> ids);

    boolean delAttachmentByFilePath(String filePath);

    SysAttachment getAttachmentByFilePath(String filePath);
}
